import axios from '@/libs/api.request'

export class EmployeeSalaryApi {
  static get (path, params = {}) {
    return request.get(path, createGETParams(params))
  }

  static post (path, params = {}) {
    return request.post(path, params)
  }

  // 根据条件获取员工薪资账单
  static getList (params) {
    return axios.request({
      url: '/EmployeeSalary/GetList',
      method: 'post',
      enctype: 'multipart/form-data',
      data: params
    })
  }

  // 导出
  static export (params) {
    return axios.request({
      url: '/EmployeeSalary/Export',
      method: 'post',
      enctype: 'multipart/form-data',
      data: params
      // responseType: 'blob'
    })
  }

  // 批量删除薪资明细
  static delete (params) {
    return axios.request({
      url: '/EmployeeSalary/Delete',
      method: 'post',
      enctype: 'multipart/form-data',
      data: params
    })
  }
}
